Repository navigation
ci(testnet): governance orders, delegations and quick-start replay checks - #19
Merged
Merged
Conversation
The test network's master key is also its starter key (CREDITS_TESTNET), so it can sign "managing" special transactions as the hardcoded key does on mainnet: - order 9 moves StartingDPOS (rewards are 0 before it, solvercore.cpp); - order 37 turns staking and mining on with a 1 CS block reward from a given round. fund.py --dpos-at / --reward-round sends both after funding. The user field is encoded the way APIHandler parses it, and signed the way Transaction::to_byte_stream_for_sig() serialises a string field. run.sh passes DPOS_AT / REWARD_ROUND. The workflow gets dpos_at, reward_round and restart_at inputs. With rewards on, every block changes the balances of the trusted nodes, so the STATE DIGEST comparison now covers reward crediting (paths A and B). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fund.py --delegations: every node delegates 1000 CS to the next one without a time limit and 500 CS until a UTC time a few minutes ahead; halfway through the load phase the even nodes withdraw the first delegation. The nodes then apply, expire and withdraw delegations, and the STATE DIGEST, which covers the delegation records, must still match on every node. Enabled with DELEGATE=1 in run.sh, or the 'delegate' input of the Testnet workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fund.py sent the special orders only when both --dpos-at and --reward-round were set, so a run with rewards on and the default StartingDPOS (10'000) silently sent neither (run 37943830969: its state digest stayed the same from block 1000 to 12000). Each order is now sent on its own. Also stop tracking the Python bytecode cache that slipped in with the first fund.py commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fund.py --min-stake sends special order 22 (minimum stake of a trusted node). With MIN_STAKE set and the restart test on, run.sh requires the restarted node to log the order twice: once live, and once more when it is replayed after the quick start. Exposed as the 'min_stake' workflow input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
Scenarios for the private 7-node test network (
ci/testnet,testnet.yml). They exercise the consensus paths fixed in #9–#12, #17 and #18. Every scenario is off by default and enabled through aworkflow_dispatchinput or an env variable ofrun.sh, so the nightly run is unchanged.dpos_at/DPOS_ATreward_round/REWARD_ROUNDmin_stake/MIN_STAKEdelegate/DELEGATECommits:
4cc4f01dsigned special transactions (orders 9 and 37) infund.py.2c244c21delegations with and without a time limit.6946fec8orders 9 and 37 sent independently. Before, a run with onlyreward_roundsilently sent neither. This commit also stops tracking the Python bytecode cache that slipped in with ci: private 7-node test network with state-digest comparison #15, and adds a.gitignore.393d1fecorder 22 and the check that it survives a quick start.Runs
min_stake=55000+ restart: FAIL without csnode: replay the other special orders after a quick start #18 (run 38033638986), PASS with csnode: replay the other special orders after a quick start #18 (run 38033640276).🤖 Generated with Claude Code